<?php
	

	$locale_id = $this->caseFHinfo['locale_id'];
	$funding_options = $this->caseInfo['funding_option'];
	$myOptionsArray = split( " ", $funding_options );
	$paid_in_full = $this->caseInfo['paid_in_full'];
	
	$results = FDMSAPIcalls::getPaymentOptionsForLocaleId($locale_id);
	$payment_methods = $results['payment_methods'];
 ?>
<script type="text/javascript">
function set_funding_options()
{
	var str = '';
	var optionsSelect = document.getElementById('funding_options_select');
	var length = optionsSelect.length;
	for( var i=0; i<length; i++ )
	{
		var selCode = optionsSelect.options[i].value;
		if(optionsSelect.options[i].selected)
		{
			str = str + selCode;
			str = str + ' ';
		}
	}	
	document.getElementById('funding_options').value = str;
}
</script>
<div class="standard left">
<br><br> 
<div class="twocol_1">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="358" height="505" id="securing_slideshow" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="../art/flash/securing_slideshow.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="../art/flash/securing_slideshow.swf" quality="high" bgcolor="#ffffff" width="358" height="505" name="securing_slideshow" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<br>
</div>

<div class="twocol_2">
		<label>Choices:</label>
		<input type=hidden name="funding_options" id="funding_options" value="<?php echo $funding_options ?>">
		<!-- <div class="standard left medium"> -->
		<select size=5 name="funding_options_select" id="funding_options_select" multiple onchange='set_funding_options()'>
		<?php
			foreach( $payment_methods as $code=>$label )
			{
				echo "<option value=\"$code\"";
				if(in_array($code, $myOptionsArray))
					echo " selected>$label</option>\n";
				else
					echo ">$label</option>\n";
			}
		 ?>
		</select>
<!-- <p> -->
<?php
if($paid_in_full) $cbselected = " checked";
#var_dump($paid_in_full);
#var_dump($cbselected);
#exit(0);
 ?>
<label for="paid_in_full"> Paid In Full</label><input type=checkbox style="width:20px;" name="paid_in_full" <?php echo $cbselected?>>
<br><br>
<!-- <p> -->
</div>
<br clear="all">
</div>
